package png
{
	import flash.utils.ByteArray;

	public class IHDRChunk
	{
		public var width:int;
		public var height:int;
		public var bitDepth:int;
		public var colorType:int;
		public var compressionMethod:int;
		public var filterMethod:int;
		public var interaceMethod:int;
		
		public function IHDRChunk()
		{
		}
		
		public function setData( data:ByteArray ):void
		{
			data.position = 0;
			width = data.readUnsignedInt();
			height = data.readUnsignedInt();
			bitDepth = data.readUnsignedByte();
			colorType = data.readUnsignedByte();
			compressionMethod = data.readUnsignedByte();
			filterMethod =  data.readUnsignedByte();
			interaceMethod = data.readUnsignedByte();
		}
		
		public function toString():String
		{
			return "IHDR chunk";
		}
	}
}